home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 3706 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: bcfreenet.seflin.lib.fl.us!bcfreenet!z007400b
  2. From: z007400b@bcfreenet.seflin.lib.fl.us (Ralph Silverman)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: cpp question
  5. Date: 30 Jan 1996 18:42:15 GMT
  6. Organization: SEFLIN Free-Net - Broward
  7. Message-ID: <4eloq7$h9u@bcfreenet.seflin.lib.fl.us>
  8. References: <4drm99$j0m@peabody.colorado.edu>
  9. NNTP-Posting-Host: bcfreenet.seflin.lib.fl.us
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. WOOD  JAMEY RYAN (woodjr@rintintin.Colorado.EDU) wrote:
  13. : I have something like this:
  14.  
  15. :      #define USERLEN 8
  16. :      #define HOSTLEN 15
  17.  
  18. :      char name[] = "woodjr";
  19. :      char host[] = "really.long.hostname.com";
  20. :      char s[100];
  21.  
  22. :      sprintf(s, "%.USERLENs@%.HOSTLENs", name, host);
  23.  
  24. : And I want cpp to parse the sprintf line to:
  25.  
  26. :      sprintf(s, "%.8s@%.15s", name, host);
  27.  
  28. : Which it (of course) isn't doing.  Is there some syntax I
  29. : can use to get it to do this?
  30.  
  31. : Thankyou,
  32. : Jamey Wood
  33.  
  34. --
  35. ***********begin r.s. response**********
  36.  
  37.     cpp will not expand macro into
  38.     string bounded by
  39.         ""
  40.     .
  41.  
  42. ***********end r.s. response************
  43. Ralph Silverman
  44. z007400b@bcfreenet.seflin.lib.fl.us
  45.  
  46.